package com.yt.lxh.common.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ConfigurableApplicationContext;

@Slf4j
public class PrintInterfaceDocumentUtil {
    /**
     * 打印接口文档地址
     * @param context
     */
    public static void initServer(ConfigurableApplicationContext context) {
        String port = context.getEnvironment().getProperty("server.port");
        log.info("接口文档地址 ---> http://localhost:{}/doc.html", port);
//        try {
//            String ipAddr = InetAddress.getLocalHost().getHostAddress();
//            String active = Arrays.toString(context.getEnvironment().getActiveProfiles());
//        } catch (UnknownHostException e) {
//            throw new RuntimeException(e);
//        }
    }
}
